<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>轮回之牢: D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/Ui/Scenes/BaseSceneUi.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">轮回之牢<span id="projectnumber">&#160;0.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_80876d1476b72d92a9650b7ee3516e4c.html">TeamCurriculumDesign</a></li><li class="navelem"><a class="el" href="dir_8774018fec5cc24188ddfa90aaf9f999.html">Ui</a></li><li class="navelem"><a class="el" href="dir_19f954f81be5b869e40af1f05a333288.html">Scenes</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">BaseSceneUi.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">//</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Created by lenovo on 2021/9/3.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#ifndef TEAMCURRICULUMDESIGN_BASESCENEUI_H</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#define TEAMCURRICULUMDESIGN_BASESCENEUI_H</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include &lt;QOpenGLWidget&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;QOpenGLExtraFunctions&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;QKeyEvent&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;../../Scenes/BaseScene.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="keyword">class </span><a class="code hl_class" href="class_base_scene.html">BaseScene</a>;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="class_base_scene_ui.html">   18</a></span><span class="keyword">class </span><a class="code hl_class" href="class_base_scene_ui.html">BaseSceneUi</a> : <span class="keyword">public</span> QOpenGLWidget, <span class="keyword">protected</span> QOpenGLExtraFunctions {</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>Q_OBJECT</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>    <a class="code hl_class" href="class_base_scene.html">BaseScene</a> *scene;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    <span class="keyword">static</span> <span class="keywordtype">void</span> drawBackGround();</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    QString floatText = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>    QTimer *floatTextTimer = <span class="keyword">nullptr</span>;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>    uint64_t startTime{}, endTime{}, timePassed = 0;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="keyword">public</span> slots:</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#a042918e51db48c88e9fcd2dc1e1318dc">clearFloatText</a>();</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#a43dd94fb44be28fbde58e7d9614b5900">continueGame</a>();</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#ac5b5974fb1dd35155932791c888f04d9">start</a>();</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#a72db41dbc5e44c38f198392e158be5e0">victory</a>();</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#af4f027136d896c7f0dc2e78ba22140fe">exit</a>();</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordtype">void</span> <a class="code hl_slot" href="class_base_scene_ui.html#a196e56d1078cb5ab19f710f40ee3ab42">newGame</a>();</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_scene_ui.html#a4f58bbcb1a972cf149ffcd58fd1c19c9">showFloatText</a>(<span class="keyword">const</span> QString &amp;text);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    <a class="code hl_class" href="class_base_scene_ui.html">BaseSceneUi</a>();</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    <a class="code hl_class" href="class_base_scene_ui.html">~BaseSceneUi</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>    <span class="keywordtype">void</span> keyPressEvent(QKeyEvent *event) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>    <span class="keywordtype">void</span> keyReleaseEvent(QKeyEvent *event) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_scene_ui.html#a05198807ad4b691ac6c55230c3bd7933">initializeGL</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_scene_ui.html#a65196ccc7c839098f44a7dcb7d3ce966">resizeGL</a>(<span class="keywordtype">int</span> width_, <span class="keywordtype">int</span> height_) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_scene_ui.html#a6bfaa16346cd5e7f855448f296687d05">paintGL</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>signals:</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="class_base_scene_ui.html#a6e5ebbbba0a011cab845f86b507cc7c9">  117</a></span>    <span class="keywordtype">void</span> <a class="code hl_signal" href="class_base_scene_ui.html#a6e5ebbbba0a011cab845f86b507cc7c9">KeyEscPressed</a>(uint64_t, <span class="keywordtype">int</span> death_times);</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="class_base_scene_ui.html#a4dd23749b3b015e663397291b7ab3a7f">  123</a></span>    <span class="keywordtype">void</span> <a class="code hl_signal" href="class_base_scene_ui.html#a4dd23749b3b015e663397291b7ab3a7f">VictoryGame</a>(uint64_t, <span class="keywordtype">int</span> death_times);</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>};</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span> </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span><span class="preprocessor">#endif </span><span class="comment">//TEAMCURRICULUMDESIGN_BASESCENEUI_H</span></div>
<div class="ttc" id="aclass_base_scene_html"><div class="ttname"><a href="class_base_scene.html">BaseScene</a></div><div class="ttdoc">逻辑场景类，后端</div><div class="ttdef"><b>Definition:</b> BaseScene.h:29</div></div>
<div class="ttc" id="aclass_base_scene_ui_html"><div class="ttname"><a href="class_base_scene_ui.html">BaseSceneUi</a></div><div class="ttdoc">主场景前端</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.h:18</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a042918e51db48c88e9fcd2dc1e1318dc"><div class="ttname"><a href="class_base_scene_ui.html#a042918e51db48c88e9fcd2dc1e1318dc">BaseSceneUi::clearFloatText</a></div><div class="ttdeci">void clearFloatText()</div><div class="ttdoc">清除悬浮文字</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:53</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a05198807ad4b691ac6c55230c3bd7933"><div class="ttname"><a href="class_base_scene_ui.html#a05198807ad4b691ac6c55230c3bd7933">BaseSceneUi::initializeGL</a></div><div class="ttdeci">void initializeGL() override</div><div class="ttdoc">实现的父类的虚函数 初始化opengl的资源</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:91</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a196e56d1078cb5ab19f710f40ee3ab42"><div class="ttname"><a href="class_base_scene_ui.html#a196e56d1078cb5ab19f710f40ee3ab42">BaseSceneUi::newGame</a></div><div class="ttdeci">void newGame()</div><div class="ttdoc">创建新游戏，需要调用开始游戏才能开始</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:36</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a43dd94fb44be28fbde58e7d9614b5900"><div class="ttname"><a href="class_base_scene_ui.html#a43dd94fb44be28fbde58e7d9614b5900">BaseSceneUi::continueGame</a></div><div class="ttdeci">void continueGame()</div><div class="ttdoc">继续游戏</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:47</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a4dd23749b3b015e663397291b7ab3a7f"><div class="ttname"><a href="class_base_scene_ui.html#a4dd23749b3b015e663397291b7ab3a7f">BaseSceneUi::VictoryGame</a></div><div class="ttdeci">void VictoryGame(uint64_t, int death_times)</div><div class="ttdoc">游戏胜利发出的信号</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a4f58bbcb1a972cf149ffcd58fd1c19c9"><div class="ttname"><a href="class_base_scene_ui.html#a4f58bbcb1a972cf149ffcd58fd1c19c9">BaseSceneUi::showFloatText</a></div><div class="ttdeci">void showFloatText(const QString &amp;text)</div><div class="ttdoc">显示悬浮文字</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:57</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a65196ccc7c839098f44a7dcb7d3ce966"><div class="ttname"><a href="class_base_scene_ui.html#a65196ccc7c839098f44a7dcb7d3ce966">BaseSceneUi::resizeGL</a></div><div class="ttdeci">void resizeGL(int width_, int height_) override</div><div class="ttdoc">窗口大小改变时触发，必须实现的虚函数</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:103</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a6bfaa16346cd5e7f855448f296687d05"><div class="ttname"><a href="class_base_scene_ui.html#a6bfaa16346cd5e7f855448f296687d05">BaseSceneUi::paintGL</a></div><div class="ttdeci">void paintGL() override</div><div class="ttdoc">渲染场景，更新界面时调用</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:108</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a6e5ebbbba0a011cab845f86b507cc7c9"><div class="ttname"><a href="class_base_scene_ui.html#a6e5ebbbba0a011cab845f86b507cc7c9">BaseSceneUi::KeyEscPressed</a></div><div class="ttdeci">void KeyEscPressed(uint64_t, int death_times)</div><div class="ttdoc">esc按下发出的信号</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_a72db41dbc5e44c38f198392e158be5e0"><div class="ttname"><a href="class_base_scene_ui.html#a72db41dbc5e44c38f198392e158be5e0">BaseSceneUi::victory</a></div><div class="ttdeci">void victory()</div><div class="ttdoc">游戏胜利</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:41</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_ac5b5974fb1dd35155932791c888f04d9"><div class="ttname"><a href="class_base_scene_ui.html#ac5b5974fb1dd35155932791c888f04d9">BaseSceneUi::start</a></div><div class="ttdeci">void start()</div><div class="ttdoc">开始游戏</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:24</div></div>
<div class="ttc" id="aclass_base_scene_ui_html_af4f027136d896c7f0dc2e78ba22140fe"><div class="ttname"><a href="class_base_scene_ui.html#af4f027136d896c7f0dc2e78ba22140fe">BaseSceneUi::exit</a></div><div class="ttdeci">void exit()</div><div class="ttdoc">退出游戏</div><div class="ttdef"><b>Definition:</b> BaseSceneUi.cpp:30</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
